package com.wuba.rxjavademo.lyz;

import rx.Subscriber;

/**
 * Created by liyaxing on 2016/5/5.
 */
public class BaseDemo {

    protected static void print(Object obj){
        System.out.println(obj) ;
    }

    protected static Subscriber<Object> mSubscriber = new Subscriber<Object>() {
        @Override
        public void onCompleted() {
            print("--onCompleted--");
        }

        @Override
        public void onError(Throwable e) {
            print("--onError-- e : " + e);
        }

        @Override
        public void onNext(Object obj) {
            print("--onNext-- obj : " + obj);
        }
    } ;

    protected static void sleepOnMainThread() {
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
